package com.xjc.study.test2022.month06;

/**
 * @author: XuJiuCheng
 * @date: Created in 15:21 2022/6/22
 * @description: 打印出整数的32进制数
 */
public class BitOperation {

    public static void main(String[] args) {
        int num = 32;
        print(num);
    }

    public static void print(int num) {
        for (int i = 31; i >= 0; i--) {
            System.out.print((num & (1 << i)) == 0 ? 0 : 1);
        }
    }

}
